#ifndef _ZERO_INCLUDE_CONFIG_H
#define _ZERO_INCLUDE_CONFIG_H
#define interface class
#define INTERFACE class

struct kernel_symbol
{
	unsigned long value;
	const char *name;
};

#define EXPORT_CXXDATA(data) \
	extern "C" char data; \
	static const char __os_strtab_##data[] \
	__attribute__((section("os_symtab_strings"), aligned(1))) \
	= "" #data; \
	static const struct kernel_symbol __os_symtab_##data \
	__attribute__((section("os_symtab"), used)) \
	= { (unsigned long) &data, __os_strtab_##data }

#define EXPORT_CXXSYMBOL(sym) \
	EXPORT_CXXDATA(sym)

#define EXPORT_CSYMBOL(sym) \
	extern typeof(sym) sym; \
	static const char __os_strtab_##sym[] \
	__attribute__((section("os_symtab_strings"), aligned(1))) \
	= "" #sym; \
	static const struct kernel_symbol __os_symtab_##sym \
	__attribute__((section("os_symtab"), used)) \
	= { (unsigned long) &sym, __os_strtab_##sym }

#define SMP
#ifdef SMP
#define LOCK_PREFIX "lock;"
#elif
#define LOCK_PREFIX ""
#endif

#define DEBUG
#define BUG

#define INITTEXT __attribute__((section(".inittext"), nothrow))
#define INITDATA __attribute__((section(".initdata")))

#define NULL 0
typedef unsigned __attribute__((mode(pointer))) ptr_t;
typedef int ptrdiff_t;
#define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER)
#define containerof(ptr, TYPE, MEMBER) ((TYPE*) (reinterpret_cast<ptr_t>(ptr) - offsetof(TYPE, MEMBER)))

#endif
